<template>
    <div>
        <b-sscroll
        :left="left"
        :right='right'
        :top="'80px'"
        ></b-sscroll>
    </div>
</template>
<script>
import BSscroll from "../components/BScroll1.vue"
import {getSingerlist} from "../api/singer";
export default {
    components:{
        BSscroll
    },
    data() {
        return {
            right:[],
            left:["热","A","B","C","D","E","F","G"]
        }
    },
    methods: {
        getSingerlistFun(){
            for(let i =1 ; i< this.left.length;i++){
                getSingerlist(
                    {
                        type:-1,
                        area:-1,
                        initial:this.left[i],
                        limit:8
                    }
                ).then(data=>{
                // console.log(data);
                this.right.push({
                    name:this.left[i],
                    data:data.artists
                })
            })
            }           
        },
        getHotsinger(){
            getSingerlist(
                 {
                        type:-1,
                        area:-1,
                        initial:-1,
                        limit:8
                    }
            ).then(data=>{
                this.right.unshift({
                    name:'热',
                    data:data.artists
                })
            })
        }
    },
    created() {
        this.getSingerlistFun();
        this.getHotsinger();
    },
}
</script>
<style lang="less">

</style>